/*
    简单的代理
*/
let homeWork = {}  //作业检查对象
const proxyTable = {  //代码字段表
    list: function(list,callback) {
       callback.call(list,list)
    },
    allDone: function(bool,callback) {
        callback.call(bool,bool)
    }
}
const hw = new Proxy(homeWork, {
     set: function(target, propKey, value, receiver) {
         console.log(`setting ${propKey}  ${value} !`);
        window.callbacks && proxyTable[propKey](value, window.callbacks[propKey])
         return Reflect.set(target, propKey, value, receiver);
     }
})
hw.list = [1,2,3]